Skip to content

Conversation

chitraarasu
Copy link

My app hangs when multiple web image loads on the screen using a scroll view, because all the processes run on the main thread. Therefore, I made the load() and cancel() methods asynchronous, separating the tasks to other threads, so the app works smoothly.

@dreampiggy
Copy link
Collaborator

because all the processes run on the main thread

Not actually. Only the render part and query cache happended on main queue, it's by design

@chitraarasu
Copy link
Author

My SwiftUI app hangs after adding WebImage to the screen. I have displayed a list of WebImages in a ScrollView and LazyHStack. I checked the Instrument tool, it displayed app processes on the main thread. After making the load() and cancel() methods asynchronous, my app works smoothly.

@dreampiggy
Copy link
Collaborator

My SwiftUI app hangs after adding WebImage to the screen. I have displayed a list of WebImages in a ScrollView and LazyHStack. I checked the Instrument tool, it displayed app processes on the main thread. After making the load() and cancel() methods asynchronous, my app works smoothly.

Can you provide your xctrace result ? With your App.dSYM and SDWebImageSwiftUI.dSYM is better (to symbolicate the symbols)

You can send me privately via email (not GitHub comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants